;(function(){
    let myChart = echarts.init(document.querySelector('div.box-center3'))

    let option = {
      legend: {
        data: ['销售额', '利润'],
        textStyle:{
          fontSize: 15,
          color: '#ccc'
        },
        top:20,
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      xAxis: [
        {
          type: 'category',
          boundaryGap: false,
          data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
        }
      ],
      yAxis: [
        {
          type: 'value'
        }
      ],
      series: [
        {
          name: '销售额',
          type: 'line',
          stack: 'Total',
          areaStyle: {},
          emphasis: {
            focus: 'series'
          },
          data: [120, 132, 101, 134, 90, 230, 210,340, 182, 191, 300, 290, 330],
          smooth:true,      // 折线丝滑
        },
        {
          name: '利润',
          type: 'line',
          stack: 'Total',
          areaStyle: {},
          emphasis: {
            focus: 'series'
          },
          data: [220, 342, 191, 234, 290, 330, 310,120, 200, 101, 134, 90,],
          smooth:true,      // 折线丝滑
        }
      ]
    };
    
    myChart.setOption(option)

    window.addEventListener('resize',() => {
        myChart.resize()
    })
})()